// 分页============================
const size = 20;
const startNum = 1;
/***
 *  @functione scrollViewScroll 
 * @dedescription scrollView分页
 **/
export const scrollViewScroll = {
	data() {
		return {
			page: {
				page_no: startNum,
				page_size: size,
				count: size,
			},
			tabindex: 0,
			list: [],

		};
	},
	methods: {
		scrolltolower() {
			if (this.page.count < this.page.page_no * this.page.page_size || this.page.count == this.page.page_no *
				this
				.page.page_size) {
				return
			}
			this.page.page_no = ++this.page.page_no
			this.init()
		},
		async scrolltoupper() {
			console.log(this.$refs.paginationScrolling)
			this.$refs.paginationScrolling.refStart()
			this.reset();
			await this.init();
			this.$refs.paginationScrolling.refFinish()
		},
		tabChange({
			item,
			index
		}) {
			this.$emit('tabChange', {
				item,
				index
			})
		},
		reset(e) {
			this.page = {
				page_no: startNum,
				page_size: size,
				count: size,
			}
			this.list = []
		},
	}
};